package com.chushouya.controller.order.admin;


import com.chushouya.common.constant.ServiceType;
import com.general.framework.core.schema.Response;
import com.chushouya.order.dto.admin.orderlogistics.OrderLogisticsDTO;
import com.chushouya.order.dto.admin.orderlogistics.OrderLogisticsQuery;
import com.chushouya.order.service.admin.OrderLogisticsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


@Slf4j
@Api(tags = ServiceType.PLATFORM + "平台物流管理")
@RestController
@RequestMapping(ServiceType.PLATFORM + "/logistics")
public class OrderLogisticsController {

    @Resource
    private OrderLogisticsService orderLogisticsService;

    @ApiOperation("订单物流信息接口")
    @GetMapping("/detail")
    public Response<OrderLogisticsDTO> logistics(OrderLogisticsQuery query) {
        return Response.success(orderLogisticsService.logistics(query));
    }
    @ApiOperation("订单物流信息接口")
    @GetMapping("/list")
    public Response<List<OrderLogisticsDTO>> logisticsList(OrderLogisticsQuery query) {
        return Response.success(orderLogisticsService.logisticsList(query));
    }
}
